<%@page import="com.mmy.domain.sys.TSysUser"%>
<%@page import="com.mmy.domain.sys.TSysAddress"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 
 <%
 	TSysUser tSysUser = (TSysUser)session.getAttribute("tSysUser");
%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="/WEB-INF/jsp/include1.jsp"></jsp:include>

		<title>个人信息管理</title>
	</head>
	<body>
<div id="off-canvas-container" class="off-canvas-container">
		<jsp:include page="/WEB-INF/jsp/FrontHeader.jsp"></jsp:include>
<div id="menu-back">
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- Main Start -->
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<main class="at-padding-large-bottom">
			<article>
				<header class="bg-light at-padding-large-top at-padding-large-bottom at-margin-large-bottom">
					<div class="page-header container">
						<div class="row">
							<div class="span-5 col">
								<h1><label>个人信息管理</label></h1>
							</div>	
							
						 </div >
					</div>
				</header>
				<section class="container">
						<!-- 个人信息展示 -->
					<div class="information" >
						<h4 class="info-h4">
							<i class="fa fa-caret-right" aria-hidden="true" ></i><label>修改个人基本信息</label>
						</h4>
						<div class="input-container">
						<form action="saveupdateperinfo" class="info-form" name="updateUserForm" method="post" onSubmit="return updateUserSubmit(this);"  enctype="multipart/form-data">
							<table class="info-table">
							<tr>
								<th><label for="updateUserName">用户姓名</label></th>
								<td colspan="5">
								<input type="hidden" name="UserID" value="${tSysUser.getUserID()}" >
								<input type="text" name="UserName" id="updateUserName" value="${tSysUser.getUserName()}" maxlength="16" required ><span class="mustWrite">*</span>
								</td>
								</tr>
								
								<tr>
								<th><label for="updateIdentity">身份证件号</label></th>
								<td colspan="5">
								<input type="text" name="Identity" id="updateIdentity" value="${tSysUser.getIdentity()}" maxlength="24" onblur="updateIdentity(this.value)" required/><span class="mustWrite">*</span>
								</td>
								</tr>
								
								<tr>
								
								<th><label for="updateUserAccount">用户登录账号</label></th>
								<td colspan="2">
								<input type="text" name="UserAccount" id="updateUserAccount" value="${tSysUser.getUserAccount()}" maxlength="32" onChange="updateUserName(this.value)" required/><span class="mustWrite">*</span>
								</td>
								<th><label for="updateUserMobile">绑定手机号</label></th>
								<td colspan="2">
								<input type="text" name="UserMobile" id="updateUserMobile" value="${tSysUser.getUserMobile()}" maxlength="16" onchange="updatePhone(this.value)" required/><span class="mustWrite">*</span>
									
								</td>
								
							</tr>
							<tr>
								
								<th><label for="updateTel">固定电话</label></th>
								<td colspan="2">
								<input type="text" name="Tel" id="updateTel" value="${tSysUser.getTel()}"  maxlength="32"/>
								</td>
								<th><label for="updateMail">邮箱</label></th>
								<td colspan="2">
								<input type="text" name="Mail" id="updateMail" value="${tSysUser.getMail()}"  maxlength="64" onchange="updateEmail(this.value)" required/>	<span class="mustWrite">*</span>
								</td>	
							</tr>
					<tr>
								
								<th><label for="updateFax">传真</label></th>
								<td colspan="2">
								<input type="text" name="Fax" id="updateFax" value="${tSysUser.getFax()}"  maxlength="32"/>
								<th><label for="updateSex1">性别</label></th>
								<td colspan="2">
							<input type="radio" class="marginleft1" name="Sex" id="updateSex1" value="0"  <c:if test="${tSysUser.getSex()=='0'}"> checked="checked"</c:if> /><label for="updateSex1">男</label>
							<input type="radio" name="Sex" class="marginleft2" value="1" id="updateSex2" <c:if test="${tSysUser.getSex()=='1'}"> checked="checked"</c:if>/><label for="updateSex2">女</label>
								</td>
							</tr>
							<tr >
								<th><label for="updateOrgID">所属公司</label></th>
								<td colspan="2">
								<c:forEach items="${lstSysOrg}" var="lstSysOrg" varStatus="status">
								<c:if test="${tSysUser.getOrgID()==lstSysOrg.getOrgID()}"><input type="text" name=OrgID" id="updateOrgName" value="${lstSysOrg.getOrgName()}" readonly="readonly"/>	 </c:if>
     						</c:forEach>
								</td>
								
								<th><label for="updateJob">职位</label></th>
								<td colspan="2">
								<input type="text" name="Job" id="updateJob"  maxlength="64" value="${tSysUser.getJob()}"/>
								</td>
								
							</tr>
							<tr>
							
							<th><label for="updateCadePath">证件照片</label></th>
								<td colspan="5">
								 <c:if test="${tSysUser.getCadePath() !=null }">
                            <img id="imges" alt="" src="${tSysUser.getCadePath() }">
                            </c:if>
								<input type="file" name="fCadePath" id="updateCadePath" value="${tSysUser.getCadePath()}"/>	 
								</td>
							</tr> 
						
							<tr>
								<th><label for="updatePhotoPath">个人照片</label></th>
								<td colspan="5">
								 <c:if test="${tSysUser.getPhotoPath() !=null }">
                            <img id="imges" alt="" src="${tSysUser.getPhotoPath() }">
                            </c:if>
								<input type="file" name="fPhotoPath" id="updatePhotoPath" value="${tSysUser.getPhotoPath()}"/>
									
								</td>
								
							</tr> 
					
						<tr>
					<th><label for="updateMemo">备注</label></th>
						<td colspan="5">
						<textarea id="updateMemo" name="Memo"  maxlength="256" >${tSysUser.getMemo()}</textarea>
					</td>
				</tr>
						</table>
						<center>
				<input type="submit" class="btn" value="保存" />
				
				<input type="button" class="btn" value="返回" onclick="rehidder()"/>
			</center>
			</form>
						</div>		
					</div>
					<!-- 个人信息结束 -->

				
				</section>
				
					
					
			</article>
			
		</main>
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- Main End -->
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
</div>
		<jsp:include page="/WEB-INF/jsp/Footer.jsp"></jsp:include>
	</div>
		<!-- /st-container -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- Script Embed Start -->
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- Main Slider -->
	<jsp:include page="/WEB-INF/jsp/include2.jsp"></jsp:include>
		<script>
			new GridScrollFx( document.getElementById( 'news-grid' ), {
				viewportFactor : 0.4
			} );
		</script>
	<script type="text/javascript">
	 window.onload = function(){
	  var sessionUser = "${tSysUser}";
   if(sessionUser.getUserType>0){
     $('#updateOrgID').attr('required', true);
   $('#updateJob').attr('required', true);
   $('#updateCadePath').attr('required', true); 
   }
	 }
 	</script>
</body>

</html>